import QtQuick 1.0

Rectangle {
    id: myRect
    width: 500
    height: 300
    color: "black"
    Component {
        id: listDelegate
        Item {
            id: listdemo
            width: listView.width
            height: 70
            Rectangle {
                id: background
                x: 5;y:5
                width: parent.width - x*2
                height: parent.height - y*2
                color: "lightpink"
                border.color: "orange"
                smooth: true
                radius: 5
            }
            Row {
                id: topLayout
                x: 10;y: 10
                width: image.width
                height: image.height
                spacing: 5
                Image {
                    id: image
                    width: 50
                    height: 50
                    source: picture
                }
                Column {
                    width: background.width - image.width - 20
                    height: image.height
                    spacing: 10
                    Text {
                        text: title
                        font.bold: true
                        font.pointSize: 16
                    }
                }
            }
        }
    }
    ListView {
        id: listView
        anchors.fill: parent
        model: DemosModel {}
        delegate: listDelegate
    }
}



